<?php
/**
 * User: ngreduce
 * Date: 16.03.11
 * Time: 19:28
 */
?>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'decline-form',
    'enableAjaxValidation'=>true,
));
//I have enableAjaxValidation set to true so i can validate on the fly the
?>
    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'id'); ?>
        <?php echo $form->textField($model,'id', array('id'=>'decline-id','readonly'=>'readonly')); ?>
        <?php echo $form->error($model,'id'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'reason'); ?>
        <?php echo $form->textArea($model,'reason', array('id'=>'decline-reason','cols'=>30,'rows'=>5)); ?>
        <?php echo $form->error($model,'reason'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::ajaxSubmitButton(Yii::t('mj-base','Decline'),$this->createUrl('resume/delete'),
                                           array('success'=>'js: function (){$("#r"+$("#decline-id").val()).addClass("item-removed"); $("#moderationDialog").dialog("close"); $("#decline-id").val(""); $("#decline-reason").val("");}'),
                                           array('id'=>'closeDeclineDialog')); ?>
    </div>

<?php $this->endWidget(); ?>

</div>

